﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Base;

public partial class member_UserManage : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            lblGreeting.Text = "欢迎您,";
            if (Base.BasePage.CheckCookies())
            {
                lblGreeting.Text += "<b>[" + GetRequest.GetCookie("LoginName") + "]</b>";
                lbtnSignOut.Visible = true;
            }
            else
            {
                lblGreeting.Text = "您未登录";
                lbtnSignOut.Visible = false;
            }
            this.bt.Text = Common.GetBottom(bt.Text);
        }
    }
    protected void lbtnSignOut_Click(object sender, EventArgs e)
    {
        if (Response.Cookies["LoginName"] != null)
        {
           bool b= GetRequest.ClearCookie("LoginName");
        }
        if (Response.Cookies["UserId"] != null)
        {
            GetRequest.ClearCookie("UserId");
        }
        if (Response.Cookies["GradeID"] != null)
        {
            GetRequest.ClearCookie("GradeID");
        }
        Response.Redirect("~/Login/Login.aspx");
    }
}
